
import { socketConfig } from '../../config/socket_config';
import { SocketMessageInterface } from '../../types/socket_message_type';
import { SocketMessageType } from './../../enum/socket_message_enum';
import { Socket, io } from 'socket.io-client';

/**
 * socket 信令
 */
export class AppSocket {

  private _instance: Socket | null = io(`${socketConfig.host}:${socketConfig.port}`)
  private readonly _eventListen = {
    'offer': [],
    'answer': []
  }

  constructor () {}

  get instance () {
    return this._instance;
  }


  createConnect () {}

  send (type: SocketMessageType, messageContent: SocketMessageInterface) {
    
  }

  closeConnect () {}

  dispose () {}
}

